<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of index
 *
 * @author bancan
 */
class Dashboard extends Controller {

    public function __construct() {
        parent::__construct();
        
//        echo 'dashboard ctrl';
        
        Session::init();
        $loggeg = Session::get('loggedIn');
        if ($loggeg == false) {
            Session::Destroy();
            header('location: login');
            exit;
        }
//        print_r($_SESSION['role']);
    }

    public function index() {
        $this->view->render('dashboard/index');
    }
    
    public function logout (){
        session_destroy();
        header ('location:'.URL.'login');
    }
    public function create_table(){
        $this->model->create_table();
    }

}

?>
